<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  
  
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:ui="http://java.sun.com/jsf/facelets"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"> 

<h:head>
	<title>Painel de controle</title>
</h:head>
 
<h:body style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';">  
	<h:form>
		<h:dataTable border="1" style=" width : 252px; height : 46px;">
			<f:facet name="header">
				<div align="left"> 
 			    	Seja bem vindo :<h:outputLabel value="#{loginUserBean.user.name}" /> <h:commandLink value="Sair do sistema" action="#{loginUserBean.logout()}"/> 
 			    </div>
				Painel de controle
			</f:facet>
			<h:column>
			<f:facet name="header">
				<h:commandLink value="Listar Usuários" action="#{userBean.listUsers()}"/>
			</f:facet>
			</h:column>			
			<h:column>
			<f:facet name="header">
				<h:commandLink value="Cadastrar Usuário" action="#{userBean.registerUser()}"/>
			</f:facet>
			</h:column>
			<h:column>
			<f:facet name="header">
				<h:commandLink value="Listar Produtos" action="#{productBean.listProducts()}"/>
			</f:facet>
			</h:column>			
			<h:column>
			<f:facet name="header">
				<h:commandLink value="Cadastrar Produto" action="#{productBean.registerProduct()}"/>
			</f:facet>
			</h:column>
			<h:column>
			<f:facet name="header">
				<h:commandLink value="Listar Categorias" action="#{categoryBean.listCategories()}"/>
			</f:facet>
			</h:column>
			<h:column>
			<f:facet name="header">
				<h:commandLink value="Cadastrar Categoria" action="#{categoryBean.registerCategory()}"/>
			</f:facet>
			</h:column>
		</h:dataTable>
	</h:form>
</h:body> 
</html>